<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<h4>Mantener Planes</h4>

<!-- Modal -->


 <!-- sample modal content -->
 <form:form class="form-search" action="mante_plan" commandName="e">
          <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>

              <h3 id="myModalLabel">Insertar Nuevo Plan</h3>
            </div>
            <div class="modal-body">
	     <label for="nombre">Titulo</label><form:input type="text" path="titulo" /><br />	     
	     <label for="apemat">Tiempo Ejecucion</label><form:input type="text" path="tiempo" /><br />
	     <label for="nombre">Inversion Total</label><form:input type="text" path="mo_total" /><br />
             <label for="vision">Visión del Negocio</label><form:textarea path="vision_negocio" rows="8" ></form:textarea><br />
            </div>
            <div class="modal-footer">
              <button class="btn" data-dismiss="modal">Cerrar</button>
              <input type="submit" value="Guardar" />
            </div>
          </div>
        <form:hidden path="categoria_id_categoria" ></form:hidden>
        <form:hidden path="usuario_id_usuario" ></form:hidden>
        <form:hidden path="estado_plan" ></form:hidden>
        <form:hidden path="in_estado" ></form:hidden>

              </form:form>
<!-- Fin Modal -->

<form:form class="form-search" action="mante_plan" commandName="e">
          <form:input type="text" path="" placeholder="Buscar" class="input-medium search-query" />
	  <form:select path="">
	     <option>Titulo</option>
	     <option>Categoria</option>
	     <option>Tiempo</option>
	  </form:select> 
          <form:input type="submit" class="btn" path="" value="Buscar"></form:input>

	<a data-toggle="modal" href="#myModal" class="btn"><i class="icon-plus">  </i> Agregar Nuevo</a>

         </form:form>

	<table class="table table-hover table-bordered">
	<thead>
	 <tr>
	   <th>Título</th>
	   <th>Categoría</th>
	   <th>Visión del Negocio </th>
	   <th>Inversión</th>
	   <th>Margen</th>
	   <th>ROI</th>
	   <th>Estado</th>

	 </tr>
	</thead>
	<tbody>
          <c:forEach var="planNegocio" items="${plan}">
	  <tr>

	   <td>${planNegocio.titulo}</td>
	   <td>${planNegocio.categoria_id_categoria}</td>
	   <td>${planNegocio.vision_negocio}</td>
	   <td>${planNegocio.mo_total}</td>
	   <td>${planNegocio.mo_margen}</td>
	   <td>${planNegocio.mo_roi}</td>
	   <td>${planNegocio.estado_plan}</td>
	  </tr>
          </c:forEach>
	</tbody>
	</table>
